import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

public class Test4 {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入用户名:");
        String userName=sc.next();
        System.out.println("请输入密码:");
        String userPassword=sc.next();
        FileWriter fw = new FileWriter("day19\\aaa.txt");
        fw.write(userName);
        fw.write("\r\n");
        fw.write(userPassword);
        fw.close();
    }
}
